/*
 * @Description: 
 * @Author: fhw
 * @Date: 2022-11-29 11:10:39
 */
import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber } from "class-validator";
import { ResumeIdDto } from "./resume.dto";

export class CreateResumeEducationDto {
    @IsNotEmpty({ message: '标题不能为空' })
    @ApiProperty({
        type: String,
        name: 'title',
        description: '标题',
    })
    public readonly title: string

    @IsNotEmpty({ message: '专业不能为空' })
    @ApiProperty({
        type: String,
        name: 'major',
        description: '专业',
    })
    public readonly major: string

    @IsNotEmpty({ message: '时间不能为空' })
    @ApiProperty({
        type: String,
        name: 'text',
        description: '时间',
    })
    public readonly date: string

}
class EducationDto {

    @IsNumber()
    @IsNotEmpty({ message: 'id不能为空' })
    @ApiProperty({
        type: Number,
        name: 'id',
        description: 'id',
    })
    public readonly id: number
    
    @IsNotEmpty({ message: '标题不能为空' })
    @ApiProperty({
        type: String,
        name: 'title',
        description: '标题',
    })
    public readonly title: string

    @IsNotEmpty({ message: '专业不能为空' })
    @ApiProperty({
        type: String,
        name: 'major',
        description: '专业',
    })
    public readonly major: string

    @IsNotEmpty({ message: '时间不能为空' })
    @ApiProperty({
        type: String,
        name: 'text',
        description: '时间',
    })
    public readonly date: string
}
export class UpdateResumeEducationDto extends ResumeIdDto {
    @ApiProperty({
        example: EducationDto,
        type: [EducationDto],
        description: '技术'
    })
    resumeEducation: EducationDto[]

}